From: Adam Williamson Date: Thu, 10 Mar 2022 00:12:36 +0000 (-0800) Subject: appDisplay: Fix folder loop in `_ensureDefaultFolders` X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~507^2^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0db64d3562b5ad3c0d297ab43e8b6374b2f5c49d;p=gnome-shell.git appDisplay: Fix folder loop in `_ensureDefaultFolders` In testing on Fedora, gnome-shell crashes here: JS ERROR: TypeError: DEFAULT_FOLDERS[folder] is undefined This needs to be a "for of" loop, not a "for in" loop, because `folders` is an array of the hash's keys, not the hash itself. Signed-off-by: Adam Williamson Part-of: --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index d8d0ff4f7..821bfe3b8 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1467,7 +1467,7 @@ class AppDisplay extends BaseAppView { this._folderSettings.set_strv('folder-children', folders); const { path } = this._folderSettings; - for (const folder in folders) { + for (const folder of folders) { const { name, categories, apps } = DEFAULT_FOLDERS[folder]; const child = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders.folder',